package org.freetek.linkdn.util.communication;

import java.io.FileNotFoundException;

import org.freetek.linkdn.util.model.LinkedInAuthResponse;
import org.freetek.linkdn.util.scribe.ScribeUtil;
import org.scribe.oauth.Scribe;
import org.scribe.oauth.Token;

public class LinkedInAuthWrapper {

	/**
	 * Sends login information to LinkedIn server
	 * 
	 * @throws FileNotFoundException
	 */
	public LinkedInAuthResponse auth() {
		Scribe scribe = ScribeUtil.getScribeInstance();
		Token requestToken = scribe.getRequestToken();

		return new LinkedInAuthResponse(requestToken.getToken(), requestToken.getSecret());
	}

}
